<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>${siteCompany.siteName!} - 登录</title>
    <meta name="author" content="${siteCompany.companyName!}">
    <meta name="keywords" content="${siteCompany.keywords}">
    <meta name="description" content="${siteCompany.description}">
    <link type="text/css" rel="stylesheet" href="/static/css/login.css?v=2021081017">
    <link rel="shortcut icon" href="/static/favicon.ico">
</head>

<body class="login-body">
<div class="login_wrap">
    <div class="wrap_left">
        <img src="/static/images/login-img.png" alt="">
    </div>
    <div class="wrap_right">
        <div class="weChat changeWxLogin">
            <div class="icon weChatIcon1"></div>
            <div class="icon weChatIcon2"></div>
            <div class="weChatDiv">
                <div class="weChatTit">手机验证码登录</div>
            </div>
        </div>
        <div class="logo">
            <img src="/static/images/logo.png" alt="" style="width: 150px">
            <#--<h3>${siteName!}</h3>-->
        </div>
        <div class="login_container">
            <div class="weChatContent" style="display: block;">
                <div id="wxLoginIframe">
                </div>
            </div>
            <div class="passwordContent" style="display: none;">
                <div class="form-wrap">
                    <div class="login-box">
                        <div class="codeLogin">
                            <div class="login_input">
                                <div class="icon icon1"></div>
                                <input type="text" id="login_mobile" class="login_text" value="${loginId!}" placeholder="请输入手机号码" maxlength="12">
                            </div>
                            <div class="login_valid">
                                <div class="login_input">
                                    <div class="icon icon2"></div>
                                    <input type="text" id="login_ran_code" class="login_text" style="width:174px" placeholder="请输入验证码" maxlength="6">
                                </div>
                                <img class="login_ran_code" src="/auth/captcha/text" alt="验证码" onclick="this.src='/auth/captcha/text?random='+Math.random();">
                            </div>
                            <div class="login_valid">
                                <div class="login_input">
                                    <div class="icon icon2"></div>
                                    <input type="text" id="login_mobile_code" class="login_text" style="width:174px" placeholder="手机登录码" maxlength="8">
                                </div>
                                <div class="sms_button" id="btn_send_login">获取登录码</div>
                            </div>
                        </div>
                        <div class="showErr" id="loginErr"></div>
                        <div class="login_button" id="login_button">登&nbsp;&nbsp;录</div>
                    </div>
                </div>
                <!-- 协议begin -->
                <div class="employee_autoLogin">
                    <div class="employeeDiv form-item-checkbox checked">
                        <div class="checkIcon checkbox-icon"></div>
                        <div class="e_a_word checkbox-label">
                            我同意
                            <a href="/auth/clause.html" target="_blank">《注册协议》</a> 和
                            <a href="/auth/privacy.html" target="_blank">《隐私政策》</a>
                        </div>
                    </div>
                </div>
                <!-- 协议end -->
            </div>
        </div>
        <div class="login_footer">
            <div>
                Copyright ©2022 版权所有 广东启点学教育科技有限公司
                <br />
                <a href="https://beian.miit.gov.cn" target="_blank">粤ICP备20024846号</a>
                &nbsp;
                <a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44130202000953" target="_blank">
                    粤公网安备 44130202000953号
                </a>
            </div>
        </div>
    </div>

</div>
<script type="text/javascript">
    var wxAppId = "${appId}";
    var wxState = "${state}";
    var wxRedirect = "${redirectUri}";
    var qdxRedirect = "${comeUrl}";
</script>
<script type="text/javascript" src="/static/libs/jquery/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="/static/libs/layui-v2.6.8/layui.js"></script>
<script type="text/javascript" src="/static/js/common.js"></script>
<script type="text/javascript" src="/static/js/auth/login.js?v=2021082015"></script>
<script type="text/javascript">
    $(document).ready(function () {
        var options = {
            id: "wxLoginIframe",
            self_redirect: false,
            appId: wxAppId,
            scope: "snsapi_login",
            redirect_uri: wxRedirect,
            state: wxState,
            //href:'http://localhost:8088/static/css/wxLogin.css'
            href: 'https://passport.youtike.com/static/css/wxLogin.css'
        };
        wechatQrCode(options);
        //切换验证码登录
        $('.weChat').on('click', function () {
            var _this = $(this);
            if (_this.hasClass('changeWxLogin')) {
                _this.removeClass('changeWxLogin');
                $('.weChatTit').text('微信扫码登录');
                $('.weChatContent').hide();
                $('.passwordContent').show();
            } else {
                _this.addClass('changeWxLogin');
                $('.weChatTit').text('手机验证码登录');
                $('.weChatContent').show();
                $('.passwordContent').hide();
            }
        })

        $('#login_button').on('click', function () {
            doLogin();
        });
        $('#btn_send_login').on('click', function () {
            sendMobileCode('login');
        });
    });
</script>
</body>

</html>